<html>
<head>
<title>GW-BASIC User's Guide</title>
<link rel="stylesheet" href="stylesheet.css">
</head>

<body>

<h1>STICK Function</h1>
<h4>Purpose:</h4>
<p>To return the x and y coordinates of two joysticks.</p>
<h4>Syntax:</h4>
<pre><i>x</i>=<b>STICK</b>(<i>n</i>)</pre>
<h4>Comments:</h4>
<p><span class="code"><i>x</i></span> is a numeric variable for storing the result.</p>
<p><span class="code"><i>n</i></span> is a valid numeric expression within the range of 0 to 3.</p>
<table border=0 cellspacing=0 cellpadding=0>
<tr><td width=80><b>Value of <span class="code"><i>n</i></span></b></td>
<td><b>Coordinate Returned</b></td></tr>
<tr><td>0</td><td>x coordinate of joystick A. Stores the x and y values for both joysticks for the following three function calls.</td></tr>
<tr><td>1</td><td>y coordinate of joystick A.</td></tr>
<tr><td>2</td><td>x coordinate of joystick B.</td></tr>
<tr><td>3</td><td>y coordinate of joystick B.</td></tr>
</table>

</body>
</html>